# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer: Sergiy Stupar <owner@sestolab.pp.ua>
pkgname=imgdiff
pkgver=1.0.2
pkgrel=16
pkgdesc="Fast pixel-by-pixel image difference tool"
url="https://github.com/n7olkachev/imgdiff"
arch="all"
license="MIT"
options="!check" # no test suite
subpackages="$pkgname-doc"
makedepends="go"
source="https://github.com/n7olkachev/imgdiff/archive/v$pkgver/imgdiff-v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -o imgdiff cmd/main.go
}

package() {
	install -Dm755 imgdiff -t "$pkgdir"/usr/bin/
	install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/"$pkgname"/
}

sha512sums="
40f2718ce6fbb3d66017b45bd8facda0a843892bb69b4d48a9d0ced7add69eedec8f98d4cf978ea8dc6ebf67850fa83fd04bb9120dbe65808511e03fe62072cb  imgdiff-v1.0.2.tar.gz
"
